#define _CRT_SECURE_NO_WARNINGS 1
#include<queue>
#include"Date.h"
#include<iostream>
using namespace std;
using namespace bit;

struct DatePointerGreater
{
	bool operator()(const Date* p1, const Date* p2)
	{
		return *p1 > *p2;
	}
};

int main()
{
	priority_queue<Date*, vector<Date*>, DatePointerGreater> pq;
	pq.push(new Date(2024, 4, 14));
	pq.push(new Date(2023, 4, 5));
	pq.push(new Date(2024, 3, 8));

	while (!pq.empty())
	{
		cout << *pq.top();
		pq.pop();
	}
	return 0;
}